package com.company.zhishidian.xuliehua;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;

/**
 * socket 网络序列化
 */
public class Client2 {
    public static void main(String[] args) throws IOException {
        Socket client = new Socket("localhost",8888);
        ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());
        oos.writeObject(new Students("aaa",32,'男'));
        oos.close();
    }
}
